package com.bootdo.market.service.impl;

import com.bootdo.market.dao.CommonDao;
import com.bootdo.market.dao.ProductChannelDao;
import com.bootdo.market.domain.ProductChannelDO;
import com.bootdo.market.service.ProductChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ProductChannelServiceImpl implements ProductChannelService {
    @Autowired
    private ProductChannelDao productChannelDao;
    @Autowired
    private CommonDao commonDao;

    @Override
    public ProductChannelDO get(Integer id) {
        return productChannelDao.get(id);
    }

    @Override
    public List<ProductChannelDO> list(Map<String, Object> map) {
        return productChannelDao.list(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return productChannelDao.count(map);
    }

    @Override
    public int save(ProductChannelDO productChannel) {
        return productChannelDao.save(productChannel);
    }

    @Override
    public int update(ProductChannelDO productChannel) {
        return productChannelDao.update(productChannel);
    }

    @Override
    public int remove(Integer id) {
        return productChannelDao.remove(id);
    }

    @Override
    public int batchRemove(Integer[] ids) {
        return productChannelDao.batchRemove(ids);
    }

    @Override
    public List<Map<String, Object>> listAllProduct() {
        return commonDao.listAllProduct();
    }

}
